<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="css/main.css"></link>
<script type="text/javascript">
	function test() {
		window.location.href = "";

	}
</script>
<title>电子书店</title>
</head>
<body>
	<div id="wrapper">
		<jsp:include page="./header.jsp"></jsp:include>
		<div id="title">
			<p>
				<a><span>购物车内商品</span></a>
			</p>
		</div>
		<div id="detail">
			<div id="shopcat">
				<table border="1" cellpadding="1" width="99%" height="100" frame=box>
					<tr>
						<th>书籍名称</th>
						<th>数量</th>
						<th>价格</th>
						<th>小计</th>
						<th></th>
					</tr>
					<c:forEach var="item" items="${sessionScope.cart.items}">
						<tr>
						<c:if test="${item.amcount>0}">
							<td>${item.title.title}</td>
							<td align="center">${item.amcount}</td>
							<td align="center"></td>
							<td align="center"></td>
							<td align="center"><form method="post" action="delshopcart.do">
									<input type="hidden" name="isbn" value="${item.title.isbn}"></input>
									<input type="submit" value="删除"></input>
								</form></td>
						</c:if>
						</tr>
					</c:forEach>
					<tr>
						<td>&nbsp;</td>
						<td>&nbsp;</td>
						<th>总计:</th>
						<th><fmt:formatNumber value="${sessionScope.cart.item.total}" pattern="##.##" minFractionDigits="2"></fmt:formatNumber></th>
						<th>&nbsp;</th>
					</tr>
				</table>
			</div>
			<div class="shopagin">
				<a href="index.jsp">继续购物</a>
			</div>
			<div id="goshopping">
				<button class="btn" type="button" onclick="test();">结账中心</button>
			</div>
		</div>
	</div>
</body>
</html>
